package com.test.spring.xml.service;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;


/**
 * 调用的地方
 *
 * org.springframework.context.support.AbstractApplicationContext#prepareRefresh()
 */
public class MyClassPathXmlApplicationContext extends ClassPathXmlApplicationContext {

	public MyClassPathXmlApplicationContext(String ... configLocations){
		super(configLocations);
	}


	@Override
	protected void initPropertySources() {
		getEnvironment().setRequiredProperties("abc");
	}

	/**
	 *覆盖父类的
	 */
	@Override
	protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory) {
		super.setAllowBeanDefinitionOverriding(false);
		super.setAllowCircularReferences(false);
		super.customizeBeanFactory(beanFactory);
	}


}
